<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>首页</title>
  <link rel="stylesheet" th:href="@{/css/index.css}" />
</head>
<body>
<div class="topDiv">首页</p></div>
<div class="middleDiv">SpringSecurity By XXL</div>
<div class="containerDiv">
  <div class="divFloat">
<!--    是否拥有user:vip1权限没有则不显示-->
    <a shiro:hasPermission="user:vip1"  th:href="@{/view/common.html/level1-1}">level1-1</a>
    <a shiro:hasPermission="user:vip2" th:href="@{/view/common.html/level1-2}">level2-1</a>
    <a  shiro:hasPermission="user:vip3" th:href="@{/view/common.html/level1-3}">level3-1</a>
  </div>
  <div class="divFloat">
    <a  shiro:hasPermission="user:vip4" th:href="@{/view/common.html/level2-1}">level1-2</a>
    <a  shiro:hasPermission="user:vip5" th:href="@{/view/common.html/level2-2}">level2-2</a>
    <a   shiro:hasPermission="user:vip6" th:href="@{/view/common.html/level2-3}">level3-2</a>
  </div>
  <div class="divFloat">
    <a  shiro:hasPermission="user:vip7" th:href="@{/view/common.html/level3-1}">level1-3</a>
    <a  shiro:hasPermission="user:vip8" th:href="@{/view/common.html/level3-2}">level2-3</a>
    <a  shiro:hasPermission="user:vip9" th:href="@{/view/common.html/level3-3}">level3-3</a>
  </div>
  <p><a th:href="@{/view/login.html}">登录</a></p>
<!-- shiro：检查是否有admin角色没有则不显示  -->
  <p><a shiro:hasRole="admin" th:href="@{/view/common.html/admin}">个人主页</a></p>
</div>
</body>
</html>
